﻿<%@ Page Title="::Promotion App::" Language="C#" MasterPageFile="~/masterpage/LoginSite.Master" AutoEventWireup="true" CodeBehind="PromotionDetail.aspx.cs" Inherits="PromotionDetail" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%--<script src="../scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var strMaster = "MainContent_tabContainerPromotion_tabPannelDealPeriod_";

            function Checked() {
                if ($("#" + strMaster + "chkEveryday").attr('checked')) {
                    $('#' + strMaster + 'chkSunday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkSunday').attr("disabled", true);
                    $('#' + strMaster + 'chkMonday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkMonday').attr("disabled", true);
                    $('#' + strMaster + 'chkTuesday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkTuesday').attr("disabled", true);
                    $('#' + strMaster + 'chkWednesday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkWednesday').attr("disabled", true);
                    $('#' + strMaster + 'chkThursday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkThursday').attr("disabled", true);
                    $('#' + strMaster + 'chkFriday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkFriday').attr("disabled", true);
                    $('#' + strMaster + 'chkSaturday').attr("CHECKED", true);
                    $('#' + strMaster + 'chkSaturday').attr("disabled", true);
                }
                 else {
                     $('#' + strMaster + 'chkSunday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkSunday').attr("disabled", false);
                     $('#' + strMaster + 'chkMonday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkMonday').attr("disabled", false);
                     $('#' + strMaster + 'chkTuesday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkTuesday').attr("disabled", false);
                     $('#' + strMaster + 'chkWednesday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkWednesday').attr("disabled", false);
                     $('#' + strMaster + 'chkThursday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkThursday').attr("disabled", false);
                     $('#' + strMaster + 'chkFriday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkFriday').attr("disabled", false);
                     $('#' + strMaster + 'chkSaturday').attr("CHECKED", false);
                     $('#' + strMaster + 'chkSaturday').attr("disabled", false);
                }
            }
            $("#" + strMaster + "chkEveryday").click(Checked);
        });
    </script>--%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:HiddenField ID="hdnDealImage" runat="server" />
<asp:HiddenField ID="hdnDealID" runat="server" />
<%--<asp:HiddenField ID="hdnUploadFile" runat="server" />
<asp:HiddenField ID="hdnUploadFileSize" runat="server" />--%>
 <table width="100%" border="0" cellpadding="0" cellspacing="0">
 <tr>
    <td align="center">
    <table width="50%" border="0" cellpadding="0" cellspacing="0">
        <tr>
        <td align="left">
    <ajaxToolkit:TabContainer runat="server" ID="tabContainerPromotion" Height="250px" 
            Width="100%" ActiveTabIndex="0">
    <ajaxToolkit:TabPanel runat="server" ID="tabPannelLocation">
    <HeaderTemplate>1.ข้อมูลสาขา </HeaderTemplate>
    <ContentTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2" align="left">
            ข้อมูลสาขา
            </td>
        </tr>
        <tr>
            <td align="left">
            สาขาที่ทำโปรโมชั่น :
            </td>
            <td align="left">
                <asp:CheckBoxList ID="chklLocation" runat="server">
                </asp:CheckBoxList>
            </td>
        </tr>
        </table>

    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="tabPannelDeal">
    <HeaderTemplate>2.ข้อมูลโปรโมชั่น </HeaderTemplate>
    <ContentTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2" align="left">
            ข้อมูลโปรโมชั่น
            </td>
        </tr>
        <%--<tr>
            <td align="left">
            สาขาที่ทำโปรโมชั่น :
            </td>
            <td align="left">
               <asp:DropDownList ID="ddlLocation" runat="server">
                </asp:DropDownList>
                <asp:Label ID="lblLocation" runat="server"></asp:Label>
            </td>
        </tr>--%>
        <tr>
            <td align="left">
            ชื่อโปรโมชั่น :
            </td>
            <td align="left">
                <asp:TextBox ID="txtPromotionName" runat="server"></asp:TextBox>
                <asp:Label ID="lblPromotionName" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left">
               รายละเอียด :
            </td>
            <td align="left">
                <asp:TextBox ID="txtPromotionDetail" runat="server"></asp:TextBox>
                <asp:Label ID="lblPromotionDetail" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left">
            Code :
            </td>
            <td align="left">
                <asp:TextBox ID="txtPromotionCode" runat="server"></asp:TextBox>
                <asp:Label ID="lblPromotionCode" runat="server"></asp:Label>
            </td>
        </tr>
       <%-- <tr>
            <td align="left">
                รูปโปรโมชั่น:</td>
            <td align="left">
                <asp:FileUpload ID="flDealImage" runat="server" />
                <asp:Image ID="imgDeal" Width="50px" runat="server" />
            </td>
        </tr>--%>
        <tr>
            <td align="left">
                ราคาขายปกติ :</td>
            <td align="left">
                <asp:TextBox ID="txtPromotionNormalPrice" runat="server"></asp:TextBox>
                <asp:Label ID="lblPromotionNormalPrice" runat="server"></asp:Label>
            </td>
            
        </tr>
        <tr>
            <td align="left">
                ราคาโปรโมชั่น :</td>
            <td align="left">
                <asp:TextBox ID="txtPromotionSellPrice" runat="server"></asp:TextBox>
                <asp:Label ID="lblPromotionSellPrice" runat="server"></asp:Label>
            </td>
        </tr>
           <tr>
            <td align="center" colspan="2">
           
                 <asp:Button runat="server" Width="80px" ID="btnClear" 
                Text="ล้างข้อมูล" onclick="btnClear_Click" />
            </td>
        </tr>
        </table>

    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="tabPannelDealPeriod">
    <HeaderTemplate>3.ข้อมูลระยะเวลาโปรโมชั่น </HeaderTemplate>
    <ContentTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
        <td align="left" colspan="2">
        ข้อมูลระยะเวลาโปรโมชั่น
        </td>
        </tr>
        <tr>
        <td align="left" valign="top" rowspan="5">ช่วงเวลาโปรโมชั่น :</td>
        <td align="left">
           Start : <asp:DropDownList ID="ddlStartTime" runat="server">
                        </asp:DropDownList>
                    <asp:Label ID="lblStartTime" runat="server"></asp:Label> 
         </td>
        </tr>
        <tr>
            <td align="left">
             End : <asp:DropDownList ID="ddlEndTime" runat="server">
                        </asp:DropDownList> 
                   <asp:Label ID="lblEndTime" runat="server"></asp:Label> 
            </td>
        </tr>
        <tr>
            <td align="left">
                <asp:CheckBox ID="chkEveryday" runat="server" Text="Everyday" 
                    AutoPostBack="True" OnCheckedChanged="chkEveryday_CheckedChanged"/>
            </td>
        </tr>
        <tr>
            <td align="left">
            <asp:CheckBox ID="chkSunday" Text="Sunday" runat="server" />
            <asp:CheckBox ID="chkMonday" Text="Monday" runat="server" />
            <asp:CheckBox ID="chkTuesday" Text="Tuesday" runat="server" />
                <asp:CheckBox ID="chkWednesday" runat="server" Text="Wednesday" />
            </td>
        </tr>
        <tr>
            <td align="left"">
            <asp:CheckBox ID="chkThursday" Text="Thursday" runat="server" />
            <asp:CheckBox ID="chkFriday" Text="Friday" runat="server" />
            <asp:CheckBox ID="chkSaturday" Text="Saturday" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="left">
                ระยะเวลาเริ่มต้นโปรโมชั่น :</td>
            <td align="left">
                <asp:TextBox ID="txtStartPromotion" runat="server"></asp:TextBox>
                <asp:ImageButton ID="btnStartPromotion" runat="server" ImageUrl="../images/icon/calendar_selector.gif" />
                <ajaxToolkit:CalendarExtender ID="cldStartPromotion" runat="server" TargetControlID="txtStartPromotion" PopupButtonID="btnStartPromotion" PopupPosition="TopRight" Enabled="True" Format="dd/MM/yyyy"></ajaxToolkit:CalendarExtender>
                <asp:Label ID="lblStartPromotion" runat="server"></asp:Label>
            </td>
        </tr>
          <tr>
            <td align="left">
                ระยะเวลาสิ้นสุดโปรโมชั่น :</td>
            <td align="left">
                <asp:TextBox ID="txtEndPromotion" runat="server"></asp:TextBox>
                <asp:ImageButton ID="btnEndPromotion" runat="server" ImageUrl="../images/icon/calendar_selector.gif"/>
                <ajaxToolkit:CalendarExtender ID="cldEndPromotion" runat="server" TargetControlID="txtEndPromotion" PopupButtonID="btnEndPromotion" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajaxToolkit:CalendarExtender>
                <asp:Label ID="lblEndPromotion" runat="server"></asp:Label>
            </td>
        </tr>
         <tr>
            <td align="center" colspan="2">
            
            <asp:Button runat="server" Width="80px" ID="btnClearPeriod" 
                Text="ล้างข้อมูล" onclick="btnClearPeriod_Click" />
            </td>
        </tr>
        </table>
        
    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="tabPannelDealImage">
    <HeaderTemplate>4.รูปโปรโมชั่น</HeaderTemplate>
    <ContentTemplate>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2" align="left">
            รูปโปรโมชั่น
            </td>
        </tr>
        <tr>
            <td align="left">
                รูปโปรโมชั่น:</td>
            <td align="left">
                <asp:FileUpload ID="flDealImage" runat="server" />
                <asp:Image ID="imgDeal" Width="50px" runat="server" />
            </td>
        </tr>
           <tr>
            <td align="center" colspan="2">
            <asp:Button runat="server" Width="80px" ID="btnSave" 
                text="บันทึก" onclick="btnSave_Click" />

            <asp:Button runat="server" Width="80px" ID="btnBack" Text="ย้อนกลับ" 
                    onclick="btnBack_Click"/>
            </td>
        </tr>
        </table>

    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>
        </td>
        </tr>
    </table>
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
        <td>
            <asp:Label ID="lblMessage" runat="server"></asp:Label>
        </td>
        </tr>
        </table>
     </td>
    </tr>
  </table>
</asp:Content>
